import requests
from bs4 import BeautifulSoup

headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'}

res_foods = requests.get('http://www.xiachufang.com/explore/',headers=headers)

if res_foods.status_code == 200:
      bs_foods = BeautifulSoup(res_foods.text,'html.parser')
      list_foods = bs_foods.find_all('div',class_='info pure-u')
      # print(list_foods)
      for item in list_foods:
            tag_a = item.find('a')
            print(tag_a.text.strip())
            print('http://www.xiachufang.com'+tag_a['href'])
            